import {
	myRequest
} from './http.js'

//获取搜索热词
export const GetHotkey = () => {
	return myRequest({
		url: '/getHotkey',
	})
}
//获取关键字搜索提示
export const GetSmartbox = (key) => {
	return myRequest({
		url: '/getSmartbox',
		data: {
			key: key
		}
	})
}
// 获取搜索结果
export const GetSearchByKey = (key) => {
	return myRequest({
		url: '/getSearchByKey',
		data: {
			key: key,
			page: 1,
			limit: 15
		}
	})
}
//获取歌曲播放链接
export const GetMusicPlay = (songmid) => {
	return myRequest({
		url: '/getMusicPlay',
		data: {
			songmid: songmid
		}
	})
}


//获取歌曲相关信息
export const GetSongInfo = (songmid) => {
	return myRequest({
		url: '/getSongInfo',
		data: {
			songmid: songmid
		}
	})
}


//获取歌曲 + 专辑 图片
export const GetImageUrl = (pmid) => {
	return myRequest({
		url: '/getImageUrl',
		data: {
			id: pmid
		},
	})
}
//获取歌曲歌词
export const GetLyric = (songmid) => {
	return myRequest({
		url: '/getLyric',
		data: {
			songmid: songmid,
			isFormat: true
		},
	})
}

//获取首页推荐
export const GetRecommend = () => {
	return myRequest({
		url: '/getRecommend',
	})
}
//获取歌单分类
export const GetSongListCategories = () => {
	return myRequest({
		url: '/getSongListCategories'
	})
}
//获取歌单列表
export const GetSongLists = (categoryId, page, limit) => {
	return myRequest({
		url: '/getSongLists',
		data: {
			categoryId: categoryId,
			page: page,
			limit: limit
		}
	})
}

//获取歌单详情
export const GetSongListDetail = (id) => {
	return myRequest({
		url: '/getSongListDetail',
		data: {
			disstid: id
		}
	})
}